package testes.vSys;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import testes.vSys.database.DatabaseController;

public class Startup extends HttpServlet{

	private static final long serialVersionUID = 4595729872307296957L;

	public void init() throws ServletException {
		super.init();
		String contextPath = this.getServletContext().getRealPath("");
	
		if (DatabaseController.initiate(contextPath + "/WEB-INF/databaseConnection.properties"))
			System.out.println("[VSys] Base de dados inicializada com sucesso.");
		else
			System.out.println("[VSys] Problemas na inicializacao da base de dados.");
	}
	
}
